﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace HuntTheWumpus
{
	

	
	public class GameControl
	{
		public static Player mainPlayer = new Player();
		public static int PlayerLocation;
        Cave cave = new Cave();
		Map map = new Map();
        public static int[,] caveSystem = new int[30, 6];
        public static int[] room = new int[6];

		public GameControl()
		{
			
		}
		
		
		public void gameOver()
		{
			//mainPlayer = new Player();
			// additional things may be added ex. reset position
		}

        public void startGame(int caveSelected)
        {
            cave.GiveCaveSystem(caveSelected);
            PlayerLocation = 1;
            getRoom(1);
        }

        public void getRoom(int roomNumber)
        {
            room = cave.GiveRoom(roomNumber);
        }

		public void callTriviaQuestions()
		{
			//Open form for trivia questions
			//retrieve questions from trivia and correct answer
			//send to UI to display
		}

		public void TriviaAnswered(Boolean isCorrect)
		{
			if (isCorrect)
			{
				mainPlayer.Gold = mainPlayer.Gold++;
			}

			else
			{
				mainPlayer.Gold = mainPlayer.Gold--;
			}

			//call back the regular exploring form
		}

		public void openHighScore(string[] names, string[] highscores)
		{
			//call to open next form from UI


			/*
			 * assign each part of array to each text box
			 */

		}
		public int move(int roomNumber)
		{
			return 1;
		}
		
		public void moveRnd()
		{
			Random rnd = new Random();
			PlayerLocation = rnd.Next(30);
			



		}
		
		public void shoot(int roomNumber)
		{
			map.arrowShooting(roomNumber);

			mainPlayer.Arrow = mainPlayer.Arrow--;

		}


	}
}

